<html>
<head>
	<meta charset='utf-8' />
	<title>后台管理</title>
	<meta http-equiv="keywords" content="求职,招聘,房屋,出租,出售,求租,求购,宠物,二手,二手车,二手物品,旧货,寻物,寻人,出兑,外兑"> 
	<meta http-equiv="description" content="便民信息网,房屋租售,宠物交易,二手物品,二手车辆,寻物寻人,出兑信息">  
	<meta name="description" content="便民信息网,房屋租售,宠物交易,二手物品,二手车辆,寻物寻人,出兑信息"/>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
	<style>
		@media screen and (max-width:450px){
			#nav_bottom{width:98%;margin:0 auto}
			#content{width:98%;margin:0 auto}
			/*页面宽度900以下时 .abc的宽度为450*/
		}
		@media screen and (min-width:450px){
			#nav_bottom{width:450px;margin:0 auto}
			#content{width:450px;margin:0 auto}
			/*页面宽度900以下时 .abc的宽度为450*/
		}
		.info_item{color:#444;margin:15px 0;display:flex}
		.info_item > div:last-child{flex:1}
	</style>
</head>
<body style='padding:0;margin:0;background:#eee'>
<!-- 1 Content容器 -->
<div id='Content'>
	<!-- 3 内容区-->
	<div style='margin:10px 0;word-break:break-all;padding:10px;'>

		<h1 style='text-align:center;'>后台管理登陆</h1>
		
	
		<div style='width:300px;margin:0 auto;border:0px solid;display:flex'>
			<div style='flex:3'>用户名：</div>
			<div style='flex:9'>
				<input type="text" name='user' style='width:100%'>
			</div>
		</div>

		<div style='width:300px;margin:20px auto;border:0px solid;display:flex'>
			<div style='flex:3'>密　码：</div>
			<div style='flex:9'>
				<input type="password" name='pwd' style='width:100%'>
			</div>
		</div>

		<div style='width:300px;margin:20px auto;border:0px solid;display:flex'>
			<div style='flex:3'>验证码：</div>
			<div style='flex:4'>
				<input type="text" name='code' style='width:95%'>
			</div>
			<div style='flex:5'>
				<img id='code_img' alt='点击获取' src="interface.php?type=code" alt="" style='width:100%' onclick="this.src=this.src+'&r='+Math.random()">
			</div>
		</div>


		<div style='text-align:center'>
			<button type='button' id='login'>登陆</button>
			<button type='button'>重置</button>
		</div>



	</div>	<!-- 3 内容区结束-->	
</div><!-- 1 Content容器结束 -->






</div><!--底部导航容器结束-->


</body>
</html>
<script src='Public/jquery.js'></script>
<script src='Public/fun.js'></script>
<script>
$(function(){
	if(GetUid('after_user') && GetUid('after_user') != 'err'){
		location.replace('after_user.html');
	}


	$('#login').click(function(){
		var user = ChangeChar($('input[name=user').val().trim());
		var pwd = ChangeChar($('input[name=pwd').val().trim());
		var code = ChangeChar($('input[name=code').val().trim());
		if(!user || !pwd || !code){
			//alert('信息不得为空！');return;
		}
		var type='After_Login';
		Token(type,function(token){
			$.ajax({
				type:'post',
				url:url,
				data:{
					token:token,
					type:type,
					user:user,
					pwd:pwd,
					code:code
				},
				success(res){
					//alert(res);
					switch(res){
						case 'e1':
						alert('验证码不正确！');
						$('#code_img').attr('src',$('#code_img').attr('src')+'&r=1');
						break;
						case 'e2':
						alert('用户名或密码不正确！');
						break;
						case 'ok':
						alert('登陆成功！');
						location.replace('after_user.html');
					}
				}
			});
		})

	});
	


});
	
</script>












